package com.yanq.liancar.adapter;
/*
 *  @创建者     liyan
 *  @创建时间   2018/9/14  9:14
 *  @描述       ${TODO}
 */


import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanq.liancar.R;
import com.yanq.liancar.bean.BShopGoodsListBean;

import java.util.List;

public class BMarketAdapter extends BaseQuickAdapter<BShopGoodsListBean.DataBean.ListBean,BaseViewHolder>{

    public BMarketAdapter(int layoutResId, @Nullable List<BShopGoodsListBean.DataBean.ListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BShopGoodsListBean.DataBean.ListBean item) {
        helper.setText(R.id.tv_title,item.getGoods_name())
                .setText(R.id.text,"¥"+item.getSale_price());
        ImageView imgageview=helper.getView(R.id.img_goodsph);
        RequestOptions options=new RequestOptions();
        options.error(R.mipmap.car_bg);
        Glide.with(mContext).load(item.getGoods_photo()).into(imgageview);
    }
}
